1. Field of the Invention
This invention relates to computer networks and file storage systems. More particularly, the invention relates to an efficient distributed transaction protocol for a distributed file sharing system.
2. Description of the Related Art
In distributed file systems, files may be replicated across multiple computing nodes. Among other purposes, file replication serves to increase the availability of files in the presence of node and network failures. However, replicating files also entails keeping the file replicas coherent with respect to each other, which can be a difficult task. Distributed transaction protocols can be utilized to ensure the atomicity of transactions involving multiple nodes. For example, it may be desirable to ensure that either multiple replicas of a given file on a plurality of nodes are updated in response to an update request or that none of the replicas are updated.
One well known type of distributed transaction protocol is known as a two phase commit (2PC) protocol. According to one variation of 2PC, one node is chosen as the coordinator for a transaction. The transaction coordinator sends a request to prepare to commit to all the participant nodes in the transaction. Each participant node returns either a Yes (ready to commit) response or a No (abort) response. The coordinator collects the responses and reaches a decision. If any participant node voted No, the coordinator may decide to abort the transaction. Otherwise the transaction may be committed. The coordinator may inform each participant node of the commit or abort decision.
Between the two phases, each participant node may block, keeping its replica of the file locked while waiting for final word from the coordinator. Thus, if the coordinator fails in the first phase, each participant node may remain blocked and unable to resolve the transaction, resulting in unavailability of the file's replica on that node.
Non-blocking three-phase commit (3PC) protocols that do not suffer from the problem described above have been used in some systems. A quorum-based 3PC protocol has been proposed that allows a distributed transaction to always make progress and reach completion in the face of multiple failures as long as a quorum of the participants are available. In the absence of failures, this 3PC protocol and other traditional 3PC protocols require three round trips of messages from the transaction coordinator to each participant for successful completion of a transaction. Also, success is typically returned to the user (or client application) after all three phases complete successfully.
Thus, 3PC protocols known in the prior art can have a negative impact on a system's efficiency due to the amount of messaging and waiting that they entail. It would be desirable to enable a distributed file sharing system to perform a more efficient non-blocking distributed transaction protocol.